<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<h4 class="sub-header">您有<s:property value="#session.listLength" />条开发信息需要处理</h4>

<div class="table-responsive">
	<table class="table table-striped table-hover">
		<thead>
			<tr>
				<th>需求编号 </th>
				<th>需求类型 </th>
				<th>需求名称 </th>
				<th>需求审批结果 </th>
				<th>受理团队</th>
				<% 
					if(((String)session.getAttribute("username")).equals("admin") || ((String)session.getAttribute("username")).equals("zhongjianyewu")
					|| ((String)session.getAttribute("username")).equals("shujuyingyong")){ 
				%>
				<th>操作</th>
				<% } %>
			</tr>
		</thead>
		<tbody>
		<s:iterator value="#session.remainIdList" id="remain" status="status" >
		<tr>
			<td><s:property value="#remain.requirementId"/></td>
			<td><s:property value="#remain.requirementType"/></td>
			<td><s:property value="#remain.requirementName"/></td>
			<td><s:property value="#remain.dealResult"/></td>
			<td><s:property value="#remain.dealTeam"/></td>
			<% 
				if(((String)session.getAttribute("username")).equals("admin") || ((String)session.getAttribute("username")).equals("zhongjianyewu")
				|| ((String)session.getAttribute("username")).equals("shujuyingyong")){ 
			%>
			<td><a type="button" class="btn btn-success" href="<s:url action="selectSomeRequirement">
 					<s:param name="requirementId" value="%{#remain.requirementId}"></s:param>
 				</s:url>">为该条需求添加开发信息</a>
		  	</td>
		  	<% } %>
			<!-- 
			<td><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
		  		为该条需求添加开发信息
				</button>
			</td>
			 -->
		</tr>
		<script type="text/javascript">$('#myModal').modal("hide");</script>					
			<!-- Modal -->
			<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			  <div class="modal-dialog">
			    <div class="modal-content">
			      <div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
			        <h4 class="modal-title" id="myModalLabel">添加开发信息</h4>
			      </div>
			      <s:form role="form" action="addDevelopment" method="post" theme="bootstrap">
				      <div class="modal-body">
				      	<s:actionerror theme="bootstrap"/>
			          	<s:actionmessage theme="bootstrap"/>
			          	<s:fielderror theme="bootstrap"/>
				  		<div class="row">
						  <div class="form-group col-xs-10 col-xs-offset-1" >
						    <label for="requirementId">需求编号</label>
						    <s:textfield  class="form-control" name="requirementId" placeholder="requirementId" readonly="true"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="requirementType">需求类型</label>
						    <s:textfield  class="form-control" name="requirementType" placeholder="requirementType" readonly="true"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="requirementName">需求名称</label>
						    <s:textfield  class="form-control" name="requirementName" placeholder="requirementName" readonly="true"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="dealResult">需求审批结果</label>
						    <s:textfield  class="form-control" name="dealResult" placeholder="dealResult" readonly="true"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="developDealTeam">受理团队</label>
						    <select name="developDealTeam" class="form-control">
					     		<option>中间业务开发</option>
					     		<option>数据应用支持</option>
					     	</select>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="developWordload">工作开发量(人/天)</label>
						    <s:textfield  class="form-control" name="developWordload" placeholder="how long does the project will spend?"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="planStartAndEnd">预计开发起止时间</label>
						    <s:textfield  class="form-control" name="planStartAndEnd" placeholder="yyyy/mm/dd-yyyy/mm/dd"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="realStartAndEnd">实际开发起止时间</label>
						    <s:textfield  class="form-control" name="realStartAndEnd" placeholder="yyyy/mm/dd-yyyy/mm/dd"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="developOwner">开发负责人</label>
						    <s:textfield  class="form-control" name="developOwner" placeholder="the owner of the project's development"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="planTouchanDate">计划投产日期</label>
						    <s:textfield  class="form-control" name="planTouchanDate" placeholder="when do you plan to put the project into production? "/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="realTouchanDate">实际投产日期</label>
						    <s:textfield  class="form-control" name="realTouchanDate" placeholder="the real time of putting the project into production"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="projectStatus">项目状态</label>
						    <select name="projectStatus" class="form-control">
					     		<option>等待排期</option>
					     		<option>开发</option>
					     		<option>测试</option>
					     		<option>待投产</option>
					     		<option>已投产</option>
					     	</select>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="touchanOwner">投产负责人</label>
						    <s:textfield  class="form-control" name="touchanOwner" placeholder="the owner of putting the project into production"/>
						  </div>
						  <div class="form-group col-xs-10 col-xs-offset-1">
						    <label for="remark">备注</label>
						    <s:textfield  class="form-control" name="remark" placeholder="something else..."/>
						  </div>
					  </div>
					</div> 
	      			<div class="modal-footer">
		       			<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
		       			<button type="submit" class="btn btn-primary">Submit</button>
		      	  	</div>
		      	  	</s:form>
			    </div>
			  </div>
			</div>
		
		</s:iterator>
		</tbody>
	</table>
</div>